﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rotempco.Core.ORM.Objects.Stores;
using Rotempco.Core.Logic;

namespace Rotempco.BaseClass.Settings
{
        public class CoreSetup
        {
            public static object GetNewCache()
            {
                return new Dictionary<string, object>();
            }

            public static void SetCache(object cache)
            {
                SingletonStore.Instance.SetCache((Dictionary<string, object>)cache);
            }

            public static void ClearCache()
            {
                SingletonStore.Instance.ClearStores();
            }

            public static void SetSettings(string websiteName = null)
            {
                SingletonStore.Instance.SingletonByThread = true;

                CoreSettingsLogic.SetWebsiteName(websiteName);
                CoreSettingsLogic.SetDBConnectionString(@"Server=db.sterndorff.net;Database=RTCTemplate;User ID=rtc;Password=rtc123");
            }

    }
}
